package cn.lzm.examplespringbootprovider;

import cn.lizemin.entity.User;
import cn.lizemin.service.UserApi;
import cn.lzm.annotation.RpcService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author lzm
 * @Date 2024/11/9
 * @description 用户服务实现类
 */
@Service
@RpcService
public class UserServiceImpl implements UserApi {

    private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class);


    @Override
    public User getUserById(Integer id) {
        log.info("接受到的入参为：id={}", id);
        if (id > 10) {
            User user = new User();
            user.setId(id);
            user.setName("李泽民");
            user.setAge(28);
            return user;
        }
        return null;
    }

}
